//
//  CodeView.m
//  Masonry
//
//  Created by weijunjie on 2018/4/12.
//

#import "CodeView.h"
#import <Masonry/Masonry.h>
@implementation CodeView

+ (instancetype)codeView {
    return [[self alloc] init];
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        [self xw_roundedCornerWithCornerRadii:CGSizeMake(2, 2) cornerColor:[UIColor whiteColor] corners:UIRectCornerAllCorners borderColor:Color140 borderWidth:0.5];
        [self initSubView];
    }
    return self;
}

- (void)initSubView {
    UILabel *codeLabel = [[UILabel alloc] init];
    codeLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:codeLabel];
    [codeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.and.right.and.top.and.bottom.equalTo(self);
    }];
    
//    UIView *codeLine = [[UIView alloc] init];
//    [codeLabel addSubview:codeLine];
//    [codeLine mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.width.equalTo(codeLabel);
//        make.height.mas_equalTo(1);
//        make.bottom.left.mas_equalTo(0);
//    }];
}


//- (void)setCodeLineColor: (UIColor *)color {
//    self.subviews.firstObject.subviews.firstObject.backgroundColor = color;
//}




@end
